<?php
/***************************************************************
*  Copyright notice
*  (c) 2009, jianyuzhu@gmail.com
*  All rights reserved
*  This script is part of the PPEMI project.
***************************************************************/

//
define('SYS_RT_FRONT_TYPE', str_replace('.front.php', '', basename(__FILE__)));
define('SYS_RT_FRONT_PATH', CONFIG_PATH . CONFIG_DIR_FRONTS . SYS_RT_FRONT_TYPE . '/');

//
if( $request_link_class ) {
	switch($request_link_class) {
	//---------------------------------------------------------------------------//
		case 'home':
			include_once(SYS_RT_FRONT_PATH . 'home.' . SYS_RT_FRONT_TYPE . '.front.php');
			break;
	//---------------------------------------------------------------------------//
		default:
			if( util_file_exists(SYS_RT_FRONT_PATH, $request_link_class, '.' . SYS_RT_FRONT_TYPE . '.front.php') ) {
				include_once(SYS_RT_FRONT_PATH . $request_link_class . '.' . SYS_RT_FRONT_TYPE . '.front.php');
			} else {
				include_once(SYS_RT_FRONT_PATH . 'home.' . SYS_RT_FRONT_TYPE . '.front.php');
			}
			break;
	}
} else {
	include_once(SYS_RT_FRONT_PATH . 'home.' . SYS_RT_FRONT_TYPE . '.front.php');
}
//
?>